﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WpfDemo
{
    /// <summary>
    /// Window1.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void mnuTest1_Click(object sender, RoutedEventArgs e)
        {
            DockPanel dock = new DockPanel();
            tabItem1.Content = dock;

            for (int i = 0; i < 17; i++)
            {
                Button btn = new Button();
                btn.Content = "Button No." + (i + 1);
                dock.Children.Add(btn);

                btn.SetValue(DockPanel.DockProperty, (Dock)(i % 4));
            }
        }

        private void itemTemplate_Click(object sender, RoutedEventArgs e)
        {
            //WpfDemo.Layout.DockLayoutWindow win = new WpfDemo.Layout.DockLayoutWindow();
            //win.Owner = this;
            //win.ShowInTaskbar = false;
            //win.Show();

            //WpfDemo.Layout.GridDataFormWindow win1 = new WpfDemo.Layout.GridDataFormWindow();
            //win1.Owner = this;
            //win1.ShowInTaskbar = false;
            //win1.Show();

            //WpfDemo.Layout.GridDataFormWindow1 win2 = new WpfDemo.Layout.GridDataFormWindow1();
            //win2.Owner = this;
            //win2.ShowInTaskbar = false;
            //win2.Show();

            //WpfDemo.Layout.GridSplitterWindow win3 = new WpfDemo.Layout.GridSplitterWindow();
            //win3.Owner = this;
            //win3.ShowInTaskbar = false;
            //win3.Show();

            //WpfDemo.Event.RoutedEventWindow win4 = new WpfDemo.Event.RoutedEventWindow();// RoutedEventWindow
            //win4.Owner = this;
            //win4.ShowInTaskbar = false;
            //win4.Show();

            WpfDemo.Event.ButtonEventWindow win5 = new WpfDemo.Event.ButtonEventWindow();// RoutedEventWindow
            win5.Owner = this;
            win5.ShowInTaskbar = false;
            win5.Show();

        }
    }
}
